<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page isELIgnored="false" %>

<%
	String ctx = request.getContextPath();
	Object msg = request.getSession().getAttribute("msg");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="SystemName" /> 1.0</title>
<link rel="stylesheet" href="<%=ctx %>/css/common.css" />
<script type="text/javascript" src="<%=ctx %>/js/jquery.js"></script>
<link rel="shortcut icon" href="<%=ctx %>/favicon.ico">
<style type="text/css">
.background { 
	display: block; 
	width: 100%; 
	height: 100%; 
	opacity: 0.4; 
	filter: alpha(opacity=40); 
	background:black; 
	position: absolute; 
	top: 0; 
	left: 0; 
	z-index: 2000; 
} 
.progressBar { 
	border: solid 2px #86A5AD; 
	background: white url(<%=ctx %>/images/common/loading.gif) no-repeat 10px 10px; 
	display: block; 
	width: 200px; 
	height: 28px; 
	position: fixed; 
	top: 50%; 
	left: 50%; 
	margin-left: -74px; 
	margin-top: -14px; 
	padding: 10px 10px 10px 50px; 
	text-align: left; 
	line-height: 27px; 
	font-weight: bold; 
	position: absolute; 
	z-index: 2001; 
} 

</style>
<script type="text/javascript">
$(document).ready(function() {
	var clientHeight = $(window).height();
	$("#main").height(clientHeight + "px");
	
	$(window).resize(function(){
		var height = $(this).height();
		$("#main").height(height);
	});
});

function showProgress(msg){
	var loadingProgress = $("#background,#progressBar");
	var progressBarDiv = $("#progressBar");
	
	progressBarDiv.text(msg);
	loadingProgress.show();
}

function hideProgress(){
	var loadingProgress = $("#background,#progressBar");
	loadingProgress.hide(); 
}
</script>
</head>
<body style="margin: 0 0 0 0;">
	<div id="background" class="background" style="display: none; "></div> 
	<div id="progressBar" class="progressBar" style="display: none; ">数据加载中，请稍等...</div>
	<%
		if(msg == null){
			out.print("<iframe id=\"main\" name=\"main\" src=\"login/loginPage.action\" width=\"100%\" height=\"100%\" frameborder=\"0\"></iframe>");
		} else {
			request.getSession().setAttribute("msg", null);
			out.print("<iframe id=\"main\" name=\"main\" src=\"login/loginPage.action?msg="+msg.toString()+"\" width=\"100%\" height=\"100%\" frameborder=\"0\"></iframe>");
		}
	%>
	
	
</body>
</html>